﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace AnguaRPGEngine.Library.Forms
{
    public partial class HostSettingsForm : Form
    {
        public int HostPort
        {
            get
            {
                return (int)nudHostPort.Value;
            }
        }
        public HostSettingsForm(int HostPort)
        {
            InitializeComponent();
            nudHostPort.Value = HostPort;

            IPAddress[] ips;

            ips = Dns.GetHostAddresses(Dns.GetHostName());

            lblHostIP.Text = "";
            foreach (IPAddress ip in ips.ToList().FindAll(p => p.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork))
            {
                lblHostIP.Text += string.Format("{0}\r\n", ip);
            }
        }

        private void HostSettingsForm_Load(object sender, EventArgs e)
        {

        }

        
    }
}
